package com.mzlalal.donate.service.impl;

import com.mzlalal.donate.dao.IndexMapper;
import com.mzlalal.donate.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @description:
 * @author: Mzlalal
 * @date: 2019/12/27 15:51
 * @version: 1.0
 */
@Service
public class IndexServiceImpl implements IndexService {

    @Autowired
    IndexMapper mapper;

    /**
     * 获取总金额
     *
     * @return
     */
    @Override
    public BigDecimal getTotalAmount() {
        return mapper.getTotalAmount();
    }

    /**
     * 获取最近七天捐款
     *
     * @return
     */
    @Override
    public List<Map<String, Object>> getRecentSevenDonate() {
        return mapper.getRecentSevenDonate();
    }
}
